package com.zrrd.fuxi._01_oop;

import org.junit.Test;

/**
 * @author WanJl
 * @version 1.0
 * @title Demo05
 * @description
 * @create 2023/11/19 11:56
 */
public class Demo05 {
    @Test
    public void test(){
        /*
            声明异常： throws

            创建异常：throw

            检测：try
            捕获并处理：catch
            必须执行：finally
         */

        int[] ints = new int[15];
        try {
            ints[15]=16;
        } catch (Exception e) {
            throw new ClassCastException();
        }


    }
}
